package model;

import java.util.List;
import java.util.Map;

public class DeviceState {
    public static class DeviceStateRestart {
        public List<String> device_nums;
        public int type;

        public DeviceStateRestart(List<String> device_nums, int type) {
            this.device_nums = device_nums;
            this.type = type;
        }
    }

    public static class DeviceStateOffline {
        public List<String> device_nums;

        public DeviceStateOffline(List<String> device_nums) {
            this.device_nums = device_nums;
        }
    }

    public static class DeviceStateOfflineProfit {
        public List<String> device_nums;
        public String coin;
        public String card;

        public DeviceStateOfflineProfit(List<String> device_nums, String coin, String card) {
            this.device_nums = device_nums;
            this.coin = coin;
            this.card = card;
        }
    }

    public static class DeviceStatePortError {
        public List<String> device_nums;
        public int device_port;
        public int is_error;

        public DeviceStatePortError(List<String> device_nums, int device_port, int is_error) {
            this.device_nums = device_nums;
            this.device_port = device_port;
            this.is_error = is_error;
        }
    }

    public static class DeviceStateReq {
        public String device_num;
        public List<String> port_fields;

        public DeviceStateReq(String device_num, List<String> port_fields) {
            this.device_num = device_num;
            this.port_fields = port_fields;
        }
    }

    public static class DeviceStateResp {
        public int code;
        public String message;
        public Object data;
        public int timestamp;

        public DeviceStateResp(int code, String message, Object data, int timestamp) {
            this.code = code;
            this.message = message;
            this.data = data;
            this.timestamp = timestamp;
        }
    }

    public static class DeviceStateData {
        public boolean is_online;
        public int csq;
        public int connection_type;
        public Map<String, Integer> state;
        public Map<String, Integer> charge_mode;
        public Map<String, Integer> pay_amount;
        public Map<String, Integer> pay_used;
        public Map<String, Integer> time_total;
        public Map<String, Integer> time_used;
        public Map<String, Integer> charge_id;
        public Map<String, Integer> eq_used;
        public Map<String, Integer> current_power;
        public Map<String, String> start_time;
        public int rev_time;

        public DeviceStateData(boolean is_online, int csq, int connection_type, Map<String, Integer> state,
                            Map<String, Integer> charge_mode, Map<String, Integer> pay_amount, Map<String, Integer> pay_used,
                            Map<String, Integer> time_total, Map<String, Integer> time_used, Map<String, Integer> charge_id,
                            Map<String, Integer> eq_used, Map<String, Integer> current_power, Map<String, String> start_time,
                            int rev_time) {
            this.is_online = is_online;
            this.csq = csq;
            this.connection_type = connection_type;
            this.state = state;
            this.charge_mode = charge_mode;
            this.pay_amount = pay_amount;
            this.pay_used = pay_used;
            this.time_total = time_total;
            this.time_used = time_used;
            this.charge_id = charge_id;
            this.eq_used = eq_used;
            this.current_power = current_power;
            this.start_time = start_time;
            this.rev_time = rev_time;
        }
    }
}